using System.Configuration;

namespace ilgolosone.Shared.Configuration
{
    public class DependencyResolverConfiguration
    {
        private static readonly DependencyResolverConfigurationSection _section;

        static DependencyResolverConfiguration()
        {
            _section = ConfigurationManager.GetSection("ilgolosone.dependencyResolver.configurationSection") as DependencyResolverConfigurationSection;

            if (_section == null)
            {
                throw new DependecyResolverSettingException("Manca la sezione di configurazione: ilgolosone.dependencyResolver.configurationSection");
            }
        }

        public static DependencyResolverConfigurationSection Instance
        {
            get { return _section; }
        }
    }
}